<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@page import="java.util.Collection"%>
<%@page import="control.ColumnControl"%>
<%@page import="model.Column"%>
<%@page import="java.util.List"%>
<%@page import="model.SubColumn"%>
<%@page import="control.SubColumnControl"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>管理页面</title>

<script src="../../resources/admin/js/prototype.lite.js" type="text/javascript"></script>
<script src="../../resources/admin/js/moo.fx.js" type="text/javascript"></script>
<script src="../../resources/admin/js/moo.fx.pack.js" type="text/javascript"></script>
<link href="../../resources/admin/images/left.css" rel="stylesheet" type="text/css" />
</head>

<body>
<table width="100%" height="280" border="0" cellpadding="0" cellspacing="0" bgcolor="#EEF2FB">
  <tr>
    <td width="182" valign="top">
    <div id="container">
    <%
            List<Column> collist = ColumnControl.getAllColumns();
            for(Column c: collist){
            %>
            <h1 class="type"><a href="javascript:void(0)"><%=c.getColumn() %></a></h1>
            <div class="content">
            <table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
              <td><img src="../../resources/admin/images/menu_topline.gif" width="182" height="5" /></td>
              </tr>
        </table>
        <ul class="MM">
            <%  
            List<SubColumn> sublist = SubColumnControl.getSubcolumnsInOne(c.getId());
            for(SubColumn s: sublist){
            %>
            <li><a href="news/newslist.jsp?sid=<%=s.getId() %>" target="main"><%=s.getSubcolumn() %></a></li>
            <%
            
            } %>
         </ul>
         </div>
            <%         
            }
         %>
         <h1 class="type"><a href="javascript:void(0)">首页图片管理</a></h1>
            <div class="content">
            <table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
              <td><img src="../../resources/admin/images/menu_topline.gif" width="182" height="5" /></td>
              </tr>
        </table>
        <ul class="MM">
         <li><a href="picnews/pic.jsp" target="main">图片新闻</a></li>
         <li><a href="scrollpic/pic.jsp" target="main">文化作品展示</a></li>
         
         </ul>
      </div>
        <script type="text/javascript">
		var contents = document.getElementsByClassName('content');
		var toggles = document.getElementsByClassName('type');
	
		var myAccordion = new fx.Accordion(
			toggles, contents, {opacity: true, duration: 400}
		);
		myAccordion.showThisHideOpen(contents[0]);
	</script>
        </td>
  </tr>
</table>
</body>
</html>
